import 'package:cookbook_v2/button/ElevatedButtonWidget.dart';
import 'package:cookbook_v2/button/TextButtonWidget.dart';
import 'package:flutter/material.dart';
import 'package:cookbook_v2/button/ButtonBarWidget.dart';
import 'package:cookbook_v2/button/CupertinoButtonWidget.dart';
import 'package:cookbook_v2/button/FloatingActionButtonWidget.dart';
import 'package:cookbook_v2/button/IconButtonWidget.dart';
import 'package:cookbook_v2/button/MaterialButtonWidget.dart';
import 'package:cookbook_v2/button/OutlineButtonWidget.dart';

class ButtonPage extends StatelessWidget {
  const ButtonPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('按钮'),
      ),
      body: ListView(
        children: <Widget>[
          GestureDetector(
            child: const ListTile(
              title: Text('MaterialButton'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const MaterialButtonWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('ElevatedButton'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const ElevatedButtonWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('TextButton'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const TextButtonWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('OutlinedButton'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const OutlineButtonWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('IconButton'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const IconButtonWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('FloatingActionButton'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) =>
                          const FloatingActionButtonWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('CupertinoButton'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const CupertinoButtonWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('ButtonBar'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const ButtonBarWidget()));
            },
          ),
        ],
      ),
    );
  }
}
